home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / OS / FWFiles / FWFileSy.cpp < prev    next >
Encoding:
Text File  |  1996-09-17  |  3.0 KB  |  93 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWFileSy.cpp
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #include "FWOS.hpp"
  11.  
  12. #ifndef FWFILESY_H
  13. #include "FWFileSy.h"
  14. #endif
  15.  
  16.  
  17. //========================================================================================
  18. //    Runtime type information
  19. //========================================================================================
  20.  
  21. #ifdef FW_BUILD_MAC
  22. #pragma segment FileSystem
  23. #endif
  24.  
  25.  
  26. //========================================================================================
  27. //    CLASS FW_CAccessPermission
  28. //========================================================================================
  29.  
  30. //----------------------------------------------------------------------------------------
  31. //    FW_CAccessPermission::FW_CAccessPermission
  32. //
  33. //    Constructor sets the values for access.  Both parameters are optional.  The default
  34. //    access is exclusive read/write.  The default deny mode is deny read/write.
  35. //----------------------------------------------------------------------------------------
  36.  
  37. FW_CAccessPermission::FW_CAccessPermission(unsigned long access, unsigned long deny)
  38. {
  39.     fRep.fAccess = access;
  40.     fRep.fDeny   = deny;
  41. }
  42.  
  43.  
  44. //----------------------------------------------------------------------------------------
  45. //    FW_CAccessPermission::FW_CAccessPermission
  46. //
  47. //  Copy constructor
  48. //----------------------------------------------------------------------------------------
  49.  
  50. FW_CAccessPermission::FW_CAccessPermission(const FW_SAccessPermission& sPermission)
  51. {
  52.     fRep.fAccess = sPermission.fAccess;
  53.     fRep.fDeny   = sPermission.fDeny;
  54. }
  55.  
  56.  
  57. //----------------------------------------------------------------------------------------
  58. //    FW_CAccessPermission::FW_CAccessPermission
  59. //
  60. //  Copy constructor
  61. //----------------------------------------------------------------------------------------
  62.  
  63. FW_CAccessPermission::FW_CAccessPermission(const FW_CAccessPermission& permission)
  64. {
  65.     fRep.fAccess = permission.fRep.fAccess;
  66.     fRep.fDeny   = permission.fRep.fDeny;
  67. }
  68.  
  69.  
  70. //----------------------------------------------------------------------------------------
  71. //    FW_CAccessPermission::operator=
  72. //----------------------------------------------------------------------------------------
  73.  
  74. FW_CAccessPermission& FW_CAccessPermission::operator=(const FW_SAccessPermission& sPermission)
  75. {
  76.     fRep.fAccess = sPermission.fAccess;
  77.     fRep.fDeny   = sPermission.fDeny;
  78.     return(*this);
  79. }
  80.  
  81.  
  82. //----------------------------------------------------------------------------------------
  83. //    FW_CAccessPermission::operator==
  84. //----------------------------------------------------------------------------------------
  85.  
  86. FW_Boolean FW_CAccessPermission::operator==(const FW_SAccessPermission& permission) const
  87. {
  88.     return ((fRep.fAccess == permission.fAccess) && (fRep.fDeny == permission.fDeny));
  89. }
  90.  
  91.  
  92.  
  93.